package com.changgou.goods.dao;

import com.changgou.goods.pojo.Spec;
import org.apache.ibatis.annotations.Select;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

public interface SpecMapper extends Mapper<Spec> {

    /**
     * 规格查询（根据分类名称）
     * */
    @Select("SELECT DISTINCT t1.* FROM tb_spec t1, tb_category t2 WHERE t1.template_id = t2.template_id AND t2.name =#{cateName}; ")
    List<Spec> findByCateName(String cateName);
}
